package com.yonyou.cyxdms.basedata.service.service.questionaire;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyxdms.basedata.service.dto.questionaire.QueryAnswerDTO;
import com.yonyou.cyxdms.basedata.service.dto.questionaire.QuestionDTO;
import com.yonyou.cyxdms.basedata.service.entity.questionaire.QuestionPO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.AnswerQuestionVO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionGroupVO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionVO;

/**
 * <p>
 * 问题库 服务类
 * </p>
 *
 * @author renwd
 * @since 2019-09-19
 */
public interface QuestionService {

    /**
     * 问题信息列表
     *
     * @param page
     * @param queryAnswerDTO
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionGroupVO>
     * @author dengqiang
     * @since 2019/9/20
     */
    IPage<QuestionGroupVO> queryQuestionGroupInfo(Page<QuestionGroupVO> page, QueryAnswerDTO queryAnswerDTO);

    /**
     * 新增问题信息
     *
     * @param questionDTO
     * @return java.lang.Integer
     * @author dengqiang
     * @since 2019/9/20
     */
    Integer addQuestionInfo(QuestionDTO questionDTO);

    /**
     * 根据id查询问题信息
     *
     * @param questionId
     * @return com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionVO
     * @author dengqiang
     * @since 2019/9/20
     */
    QuestionVO queryQuestionById(Long questionId);

    /**
     * 修改问题信息
     *
     * @param questionDTO
     * @return java.lang.Integer
     * @author dengqiang
     * @since 2019/9/20
     */
    Integer updateQuestionInfo(QuestionDTO questionDTO);

  /**
   * 给问题设置属性
   *
   * @param questionPo
   * @param questionDto
   * @return void
   * @author dengqiang
   * @since 2019/9/20
   */
    public void setQuestion(QuestionPO questionPo,QuestionDTO questionDto);

    /**
     * 删除问题信息
     *
     * @param questionId
     * @return java.lang.Integer
     * @author dengqiang
     * @since 2019/9/20
     */
    Integer deleteQuestionById(Long questionId);

    /**
     * 根据问题id查询问题和答案组信息
     *
     * @param page
     * @param questionId
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.yonyou.cyxdms.basedata.service.vo.questionaire.AnswerQuestionVO>
     * @author dengqiang
     * @since 2019/9/23
     */
    IPage<AnswerQuestionVO> queryAnswerQuestionByQuestionId(Page<AnswerQuestionVO> page, Long questionId);
}
